# first file is testhkl.dat
# second file is INPUT/DFIT/dat.hkl
ARGIND==1{i[$9]=$7;msg[$9]=$0}
ARGIND==2&&FNR>2{k=FNR-2;h[k]=k" "$0}
END{
    for(j in i){
	print msg[j];
	print h[j];
	print h[i[j]];
    }
}
